#include "scheduler/force_success_scheduler.h"
#include "../policy/behavior_tree/behavior_tree_force_success_policy.h"
#include "../policy/policy_factory.h"

namespace scheduler
{

ForceSuccessScheduler::ForceSuccessScheduler(const std::string &name)
    : AbstractScheduler(name)
{
    schedule_policy_ = policy::PolicyFactory<policy::BehaviorTreeForceSuccessPolicy>::createPolicy(name);
}
bool ForceSuccessScheduler::appendTask(const task::AbstractTaskConstPtr &task)
{
    EASE_ERROR("force success scheduler cannot add task");
    throw std::runtime_error("force success scheduler cannot add task");
}
bool ForceSuccessScheduler::appendScheduler(const AbstractSchedulerConstPtr &scheduler)
{
    EASE_ERROR("force success scheduler cannot add scheduler");
    throw std::runtime_error("force success scheduler cannot add scheduler");
}
ForceSuccessScheduler::~ForceSuccessScheduler() = default;
}
